home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1988 April / 1988-04.d64 / demo 3 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  149 lines

  1. 5 rem******* scale = 319 by 239 ********
  2. 10 rem**********************************
  3. 20 rem**** build titles and outline ****
  4. 30 rem**********************************
  5. 40 rem
  6. 41 poke50913,1:poke50959,1
  7. 42 poke50918,0:poke50964,51
  8. 43 poke50923,0:poke50969,117
  9. 50 printchr$(8)+chr$(14):@2:@3
  10. 60 @4,0,116:@7,319,116,0:@8,0,116,13
  11. 70 @4,159,0:@7,159,239,0:@8,159,0,13
  12. 80 @4,319,239:@7,319,0,0
  13. 90 @7,0,0,0:@7,0,239,0
  14. 100 ch$=chr$(14)+chr$(18)+"      [196][199][210][193][208][200] demo by [196]an [195]oy 5/87       "
  15. 110 @10,0,24,ch$
  16. 120 ch$=chr$(146)+"[204]ines:"
  17. 130 @10,1,23,ch$:@10,1,22,"[163][163][163][163][163][163]"
  18. 140 @10,1,11,"[198]ills:":@10,1,10,"[163][163][163][163][163][163]"
  19. 150 @10,21,23,"[212]ext:":@10,21,22,"[163][163][163][163][163]"
  20. 160 @10,21,11,"[199]raphics:":@10,21,10,"[163][163][163][163][163][163][163][163][163]"
  21. 170 rem
  22. 180 rem*********************************
  23. 190 rem*** draw example line styles ****
  24. 200 rem*********************************
  25. 210 rem
  26. 220 fori=0 to 8
  27. 230 s%=i:y%=215-(5*i)
  28. 240 @4,20,y%:@7,140,y%,s%
  29. 250 next i
  30. 260 fori=9 to 17
  31. 270 s%=i:y%=210-(5*i)
  32. 280 @4,140,y%:@7,20,y%,0:@8,140,y%,s%
  33. 290 next i
  34. 300 rem
  35. 310 rem*********************************
  36. 320 rem****** draw fill examples *******
  37. 330 rem*********************************
  38. 340 rem
  39. 350 @4,20,15:@7,140,15,0:@7,140,100,0
  40. 360 @7,20,100,0:@7,20,15,0
  41. 370 @4,40,35:@7,120,35,0:@7,120,80,0
  42. 380 @7,40,80,0:@7,40,35,0
  43. 390 @4,80,35:@7,80,80,0:@7,120,35,0
  44. 400 @4,40,58:@7,80,58,0
  45. 410 @9,60,65,0:@9,60,45,1
  46. 420 @9,90,45,4:@9,110,70,7
  47. 430 @9,80,20,8:@9,80,90,8
  48. 440 rem*********************************
  49. 450 rem***** print text crossword ******
  50. 460 rem*********************************
  51. 470 rem
  52. 480 ch$=chr$(142)+chr$(146)+"uppercase"
  53. 490 @11,27,21,ch$
  54. 500 for i=0to150:next i
  55. 510 ch$=chr$(14)+"lowercase"
  56. 520 @10,29,21,ch$
  57. 530 for i=0to150:next i
  58. 540 ch$=chr$(142)+chr$(18)+"reverse"
  59. 550 @10,26,13,ch$
  60. 560 for i=0to150:next i
  61. 570 ch$=chr$(146)+"normal"
  62. 580 @10,23,15,ch$
  63. 590 for i=0to150:next i
  64. 600 @10,25,17,"horizontal"
  65. 610 for i=0to150:next i
  66. 620 @11,33,23,"vertical"
  67. 630 for i=0to150:next i
  68. 640 rem*********************************
  69. 650 rem******** draw spaceship *********
  70. 660 rem*********************************
  71. 670 rem
  72. 680 ro=(NULL)/6:el=(NULL)/12
  73. 690 yc=0:zc=0:rc=10
  74. 700 fori=-50to10step20
  75. 710 xc=i:gosub1000
  76. 720 nexti
  77. 730 xc=20:rc=8:gosub1000
  78. 740 xc=40:yc=0:zc=30:rc=40:gosub1200
  79. 750 zc=35:gosub1200
  80. 760 zc=33:rc=5
  81. 770 fori=-70to-10step20
  82. 780 xc=i:yc=33:gosub1000:yc=-33:gosub1000
  83. 790 next i
  84. 795 fori=0to5
  85. 800 ag=(NULL)*i/3:xc=-50:yc=0:zc=0:rc=0:gosub1400:@4,x%,y%
  86. 805 rc=10:gosub1400:@7,x%,y%,0:xc=10:gosub1400:@7,x%,y%,0
  87. 810 rc=0:gosub1400:@7,x%,y%,0:xc=20:rc=8:gosub1400:@7,x%,y%,0
  88. 815 next i
  89. 820 fori=0to5
  90. 825 ag=(NULL)*(i/3+1/6):xc=40:yc=0:zc=30:rc=0:gosub1600:@4,x%,y%
  91. 830 rc=40:gosub1600:@7,x%,y%,0:zc=35:gosub1600:@7,x%,y%,0
  92. 835 rc=0:gosub1600:@7,x%,y%,0
  93. 840 next i
  94. 845 fori=0to3
  95. 850 ag=(NULL)*i/2:xc=-70:yc=33:zc=33:rc=0:gosub1400:@4,x%,y%
  96. 855 rc=5:gosub1400:@7,x%,y%,0:xc=-10:gosub1400:@7,x%,y%,0
  97. 860 rc=0:gosub1400:@7,x%,y%,0
  98. 865 xc=-70:yc=-33:zc=33:rc=0:gosub1400:@4,x%,y%
  99. 870 rc=5:gosub1400:@7,x%,y%,0:xc=-10:gosub1400:@7,x%,y%,0
  100. 875 rc=0:gosub1400:@7,x%,y%,0
  101. 880 next i
  102. 885 x=10:y=0:z=10:gosub2000:@4,x%,y%
  103. 890 x=30:z=30:gosub2000:@7,x%,y%,0
  104. 895 x=10:gosub2000:@7,x%,y%,0
  105. 900 x=-10:z=10:gosub2000:@7,x%,y%,0
  106. 905 x=10:gosub2000:@7,x%,y%,0
  107. 910 x=-20:y=7:z=7:gosub2000:@4,x%,y%
  108. 915 y=26:z=29:gosub2000:@7,x%,y%,0
  109. 920 x=-30:gosub2000:@7,x%,y%,0
  110. 925 y=7:z=7:gosub2000:@7,x%,y%,0
  111. 930 x=-20:gosub2000:@7,x%,y%,0
  112. 935 x=-20:y=-7:z=7:gosub2000:@4,x%,y%
  113. 940 y=-26:z=29:gosub2000:@7,x%,y%,0
  114. 945 x=-30:gosub2000:@7,x%,y%,0
  115. 950 y=-7:z=7:gosub2000:@7,x%,y%,0
  116. 955 x=-20:gosub2000:@7,x%,y%,0
  117. 960 rem*********************************
  118. 963 rem***** save, load, and print *****
  119. 965 rem*********************************
  120. 966 rem
  121. 968 fori=0to2500:nexti
  122. 970 print"[147][211]aving demomstration screen to disk...":@1:@12,"demo.dat"
  123. 975 @3:@2:@13,"demo.dat":open8,8,15,"s:demo.dat":close8:fori=0to2500:nexti
  124. 980 print"[147][208]rint demonstration screen (y/n)?":@1
  125. 983 getc$:if(c$="")goto983
  126. 986 if(c$<>"y")thenprint"[147]":end
  127. 988 @2:@14:print"[147]":@1:end
  128. 1000 dc=(NULL)/4:x=xc:y=yc:z=zc+rc
  129. 1010 gosub2000:@4,x%,y%
  130. 1020 for ag=dcto(2*(NULL)+dc)stepdc
  131. 1030 y=yc+rc*sin(ag):z=zc+rc*cos(ag)
  132. 1040 gosub2000:@7,x%,y%,0
  133. 1050 next ag
  134. 1060 return
  135. 1200 dc=(NULL)/12:y=yc:z=zc:x=xc+rc
  136. 1210 gosub2000:@4,x%,y%
  137. 1220 for ag=dcto(2*(NULL)+dc)stepdc
  138. 1230 x=xc+rc*cos(ag):y=yc+rc*sin(ag)
  139. 1240 gosub2000:@7,x%,y%,0
  140. 1250 next ag
  141. 1260 return
  142. 1400 x=xc:y=yc+rc*sin(ag):z=zc+rc*cos(ag):goto2000
  143. 1600 z=zc:x=xc+rc*cos(ag):y=yc+rc*sin(ag):goto2000
  144. 2000 sr=sin(ro):cr=cos(ro)
  145. 2010 se=sin(el):ce=cos(el)
  146. 2020 x%=x*cr-y*sr+242
  147. 2030 y%=z*ce-(y*cr+x*sr)*se+30
  148. 2040 return
  149.